package com.the_last.pojo.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@TableName("sys_permission")
@AllArgsConstructor
@NoArgsConstructor
public class SysPermission {
    
    @TableId(type = IdType.AUTO)
    private Long id;
    
    @TableField("permission_code")
    private String permissionCode;
    
    @TableField("permission_name")
    private String permissionName;
    
    @TableField("resource_type")
    private String resourceType;
    
    @TableField("parent_id")
    private Long parentId;
    
    @TableField("sort_order")
    private Integer sortOrder;
    
    /**
     * 业务类型ID (关联sys_permission_business_type表)
     */
    @TableField("business_type_id")
    private Long businessTypeId;
    
    /**
     * 业务类型信息 (关联查询结果，不存储)
     */
    @TableField(exist = false)
    private SysPermissionBusinessType businessType;
    
    private Integer status;
    
    @TableField("created_time")
    private LocalDateTime createdTime;
    
    @TableField("updated_time")
    private LocalDateTime updatedTime;
    
    private Integer deleted;
    
}